home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Telnet 2.6.1d1 4⁄26⁄94 Folder / source / init / iNetwork.c next >
Text File  |  1993-11-06  |  2KB  |  69 lines

  1. /*
  2. *    iNetwork.c
  3. *    General network initialization routines
  4. *    Called only by init.c
  5. *
  6. *****************************************************************
  7. *    NCSA Telnet for the Macintosh                                *
  8. *                                                                *
  9. *    National Center for Supercomputing Applications                *
  10. *    Software Development Group                                    *
  11. *    152 Computing Applications Building                            *
  12. *    605 E. Springfield Ave.                                        *
  13. *    Champaign, IL  61820                                        *
  14. *                                                                *
  15. *    Copyright (c) 1986-1993,                                    *
  16. *    Board of Trustees of the University of Illinois                *
  17. *****************************************************************
  18. *  Revisions:
  19. *  7/92        Telnet 2.6:    Initial version.  Jim Browne
  20. */
  21.  
  22. #ifdef MPW
  23. #pragma segment INIT
  24. #endif
  25.  
  26. #include "TelnetHeader.h"
  27. #include "iNetwork.proto.h"
  28. #include "debug.h"
  29. #include "InternalEvents.h"
  30. #include "telneterrors.h"            /* For printing errors */
  31. #include "network.proto.h"    // For Mnetinit proto
  32. #include "netevent.proto.h"    // For Stask & setblocksize proto
  33. #include "bkgr.proto.h"            // For StartUpFTP proto
  34.  
  35. extern QHdr        gEventsQueue, gEventsFreeQueue;
  36. extern short    gQueueLength;
  37.  
  38. /*************************************************************************/
  39. /* neteventinit
  40. *  load up the pointers for the event queue
  41. *  makes a circular list to follow, required for error messages
  42. */
  43. void neteventinit( void)
  44. {
  45.     gEventsFreeQueue.qHead = 0;
  46.     gEventsFreeQueue.qTail = 0;
  47.     gEventsFreeQueue.qFlags = 0;
  48.     gEventsQueue.qHead = 0;
  49.     gEventsQueue.qTail = 0;
  50.     gEventsQueue.qFlags = 0;
  51.     
  52.     ChangeQueueLength(NEVENTS);
  53.     gQueueLength = NEVENTS;
  54. }
  55.  
  56. /* initnet - init all of the network stuff... */
  57. void initnet( void)
  58. {
  59.     neteventinit();                            /* initializes for error messages to count */
  60.  
  61.     Mnetinit();
  62.     setblocksize(512);                        // BUGG
  63.     StartUpFTP();
  64.  
  65. #ifdef PC
  66.     Srcpmode(Scon.rcp);
  67. #endif
  68.     Stask();
  69. }